package com.feri.buy.auth.controller;

import com.feri.buy.auth.service.intf.UserService;
import com.feri.buy.common.anno.CheckParam;
import com.feri.buy.common.bo.UserAddBo;
import com.feri.buy.common.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("server/auth/")
public class UserController {
    @Autowired
    private UserService service;
    @GetMapping("check.do")
    @CheckParam
    public R check(String phone){
        return service.check(phone);
    }
    @PostMapping("register.do")
    public R register(@RequestBody UserAddBo bo){
        return service.register(bo);
    }
}
